<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!--
Copyright 2004 ThoughtWorks, Inc

 Licensed under the Apache License, Version 2.0 (the "License");
 you may not use this file except in compliance with the License.
 You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

 Unless required by applicable law or agreed to in writing, software
 distributed under the License is distributed on an "AS IS" BASIS,
 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 See the License for the specific language governing permissions and
 limitations under the License.
-->
<html>
<head>
    <meta content="text/html; charset=ISO-8859-1"
          http-equiv="content-type">
    <title>Test CSS Locators</title>
</head>

<body>
<table cellpadding="1" cellspacing="1" border="1">
    <tbody>
        <tr>
            <td rowspan="1" colspan="3">Test CSS Locators<br>
            </td>
        </tr>
        <!--
        Unimplemented features:
            namespace
            pseudo element
                ::first-line
                ::first-letter
                ::selection
                ::before
                ::after
            pseudo class including:
                :nth-of-type
                :nth-last-of-type
                :first-of-type
                :last-of-type
                :only-of-type
                :visited
                :hover
                :active
                :focus
                :indeterminate
        -->

        <tr>
            <td>open</td>
            <td>../tests/html/test_locators.html</td>
            <td>&nbsp;</td>
        </tr>
        <!--css2 selector test-->
        <!--universal selector-->
        <tr>
            <td>verifyElementPresent</td>
            <td>css=*</td>
            <td>&nbsp;</td>
        </tr>

        <!--only element type-->
        <tr>
            <td>verifyText</td>
            <td>css=p</td>
            <td>this is the first element in the document</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=a</td>
            <td>this is the first element</td>
        </tr>
        <!--id selector-->
        <tr>
            <td>verifyText</td>
            <td>css=a#id3</td>
            <td>this is the third element</td>
        </tr>
        <!--attribute selector-->
        <tr>
            <td>verifyElementPresent</td>
            <td>css=input[name]</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=a[href="#id3"]</td>
            <td>this is the third element</td>
        </tr>
        <tr>
            <td>verifyElementNotPresent</td>
            <td>css=span[selenium:foo]</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=a[class~="class2"]</td>
            <td>this is the fifth element</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=a[lang|="en"]</td>
            <td>this is the sixth element</td>
        </tr>

        <!--class selector-->
        <tr>
            <td>verifyElementPresent</td>
            <td>css=a.a1</td>
            <td>this is the first element</td>
        </tr>
        <!--pseudo class selector-->
        <tr>
            <td>verifyText</td>
            <td>css=th:first-child</td>
            <td>theHeaderText</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=a:lang(en)</td>
            <td>this is the first element</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=#linkPseudoTest :link</td>
            <td>link pseudo test</td>
        </tr>
        <!--descendant combinator-->
        <tr>
            <td>verifyText</td>
            <td>css=div#combinatorTest a</td>
            <td>and grandson</td>
        </tr>
        <!--child combinator-->
        <tr>
            <td>verifyText</td>
            <td>css=div#combinatorTest &gt; span</td>
            <td>this is a child and grandson</td>
        </tr>
        <!--preceding combinator-->
        <tr>
            <td>verifyText</td>
            <td>css=span#firstChild + span</td>
            <td>another child</td>
        </tr>

        <!--css3 selector test-->
        <!--attribuite test-->
        <tr>
            <td>verifyText</td>
            <td>css=a[name^="foo"]</td>
            <td>foobar</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=a[name$="foo"]</td>
            <td>barfoo</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=a[name*="zoo"]</td>
            <td>foozoobar</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=a[name*="name"][alt]</td>
            <td>this is the second element</td>
        </tr>
        <!--pseudo class test-->
        <tr>
            <td>verifyElementPresent</td>
            <td>css=html:root</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=div#structuralPseudo :nth-child(2n)</td>
            <td>span2</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=div#structuralPseudo :nth-child(2)</td>
            <td>span2</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=div#structuralPseudo :nth-child(-n+6)</td>
            <td>span1</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=div#structuralPseudo :nth-last-child(4n+1)</td>
            <td>span4</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=div#structuralPseudo :nth-last-child(2)</td>
            <td>div3</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=div#structuralPseudo :nth-last-child(-n+6)</td>
            <td>span3</td>
        </tr>

        <tr>
            <td>verifyText</td>
            <td>css=div#structuralPseudo :first-child</td>
            <td>span1</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=div#structuralPseudo :last-child</td>
            <td>div4</td>
        </tr>

        <tr>
            <td>verifyText</td>
            <td>css=div#onlyChild span:only-child</td>
            <td>only child</td>
        </tr>

        <tr>
            <td>verifyElementPresent</td>
            <td>css=span:empty</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=div#targetTest span:target</td>
            <td>target</td>
        </tr>
        <tr>
            <td>verifyElementPresent</td>
            <td>css=input[type="text"]:enabled</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>verifyElementPresent</td>
            <td>css=input[type="text"]:disabled</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>verifyElementPresent</td>
            <td>css=input[type="checkbox"]:checked</td>
            <td>&nbsp;</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=a:contains("zoo")</td>
            <td>foozoobar</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=div#structuralPseudo span:not(:first-child)</td>
            <td>span2</td>
        </tr>
        <tr>
            <td>verifyText</td>
            <td>css=div#structuralPseudo :not(span):not(:last-child)</td>
            <td>div1</td>
        </tr>
        <!--combinator test-->
        <tr>
            <td>verifyText</td>
            <td>css=div#combinatorTest span#firstChild ~ span</td>
            <td>another child</td>
        </tr>



    </tbody>
</table>
</body>
</html>
